package com.hp.modules.sys.dto;

import com.hp.common.base.constant.CommonConstants;
import com.hp.common.validator.Groups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @version 1.0
 * @ClassName SysDictParam
 * @Description TODO
 * @Auth lenovo
 * @Date 2021/7/22 11:27
 **/
@ApiModel(description = "字典")
public class SysDictParam {
    @ApiModelProperty(value = "主键-更新时必填")
    @NotNull(message = "主键不能为空",groups = {Groups.Update.class})
    private Long id;
    @ApiModelProperty(value = "名称",required = true)
    @NotBlank(message = "名称不能为空",groups = {Groups.Save.class,Groups.Update.class})
    private String name;
    @ApiModelProperty(value = "唯一编码",required = true)
    @NotBlank(message = "唯一编码不能为空",groups = {Groups.Save.class,Groups.Update.class})
    @Pattern(regexp = CommonConstants.COLUMN_REG,message = "唯一编码只能是字母与下划线")
    private String dictKey;
    @ApiModelProperty(value = "备注",required = false)
    private String remark;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDictKey() {
        return dictKey;
    }

    public void setDictKey(String dictKey) {
        this.dictKey = dictKey;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
